<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 宝贝嘉燕
  Date: 2021/9/26
  Time: 11:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%
    int age=16;
    pageContext.setAttribute("age",age);
%>

<c:if  test="${age>18}"   var="ss" scope="session">
    <h1>来了老弟</h1>
</c:if>
<c:if test="${age<18}"  var="cc"  scope="application">
    <h1>老弟多大了</h1>
</c:if>
判断age>18的结果：  ${sessionScope.ss}
<br>
判断age<18的结果： ${applicationScope.cc
}
</body>
</html>
